package fun.zerone.service.user.controller;

import fun.zerone.service.user.biz.user.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by XQL on 2021/4/13.
 */
@RestController
@RefreshScope
public class UserController {

    @Value("${testVal:'abc'}")
    private String testVal;

    @Autowired
    private UserService userService;

    @GetMapping("hello")
    private String hello() {
        return userService.find(1);
    }

    @GetMapping("test")
    public String test() {
        return testVal;
    }

}
